<% unless variables.empty? %>
  <section>
    <header class="section-header variables-header">
      <h2><%= header %></h2>
    </header>
    <%= form.fields_for field_name do |field| %>
      <% variables.each do |variable| %>
        <p class="variables-fields">
          <% if variable.select %>
            <%= field.select variable.name, options_for_select([["Please select...", { disabled: "disabled" }]] + variable.select, variable.default || "Please select...") %>
          <% else %>
            <%= field.text_field variable.name, value: params[variable.name].presence || variable.default %>
          <% end %>
          <%= field.label variable.name, variable.title || variable.name %>
        </p>
      <% end %>
    <% end %>
  </section>
<% end %>
